Sticky sessions (session affinity) is a mechanism that binds a user's session to a specific target, ensuring all requests from that user during the session are routed to the same target. It is implemented using HTTP cookies [citation:1][citation:3].
Sticky sessions, also known as session affinity, is a mechanism that allows the load balancer to bind a user's session to a specific target. This ensures that all requests from the user during that session are sent to the same backend server, which is critical for applications that store session state locally. It is implemented using HTTP cookies [citation:1][citation:3].
There are two types of cookies used by the Application Load Balancer (ALB): duration-based cookies generated by the ALB (cookie name AWSALB) and application-based cookies generated by the target (the target defines the cookie name) [citation:3]. The Network Load Balancer (NLB) supports source IP address-based stickiness [citation:1].